using System;
using System.Collections.Generic;
using System.IO;

namespace Solver
{
	internal class PrimeNumbersSource
	{
		private readonly string path_;

		public PrimeNumbersSource(string path)
		{
			path_ = path;
		}

		public IEnumerable<int> IntPrimes()
		{
			using (var sr = new StreamReader(path_))
			{
				string line;
				while ((line = sr.ReadLine()) != null)
					yield return Int32.Parse(line);
			}
		}

		public IEnumerable<long> LongPrimes()
		{
			using (var sr = new StreamReader(path_))
			{
				string line;
				while ((line = sr.ReadLine()) != null)
					yield return Int64.Parse(line);
			}
		}
	}
}